package com.qing.picture.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qing.picture.api.aliyunai.model.CreateOutPaintingTaskResponse;
import com.qing.picture.model.dto.file.PictureUploadRequest;
import com.qing.picture.model.dto.picture.*;
import com.qing.picture.model.entity.Picture;
import com.qing.picture.model.entity.User;
import com.qing.picture.model.vo.PictureVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;


/**
* @author 86157
* @description 针对表【picture(图片)】的数据库操作Service
* @createDate 2025-03-16 15:00:26
*/
public interface PictureService extends IService<Picture> {

    PictureVo uploadPicture(MultipartFile multipartFile, PictureUploadRequest pictureUploadRequest, User loginUser);
    PictureVo uploadPictureUrl(String fileUrl, PictureUploadRequest pictureUploadRequest, User loginUser);
    QueryWrapper<Picture> getQueryWrapper(PictureQueryRequest pictureQueryRequest);
    PictureVo getPictureVO(Picture picture, HttpServletRequest request);
    Page<PictureVo> getPictureVOPage(Page<Picture> picturePage, HttpServletRequest request);
    Page<Picture> getColorPicture(PictureQueryRequest pictureQueryRequest);
    void validPicture(Picture picture);
    void validPictureBatch(PictureEditByBatchRequest pictureEditByBatchRequest, User loginUser);
    void checkPictureAuth(User loginUser, Picture picture);
    void doPictureReview(PictureReviewRequest pictureReviewRequest, User loginUser);
    void clearPictureFile(String imgUrl);
    void fillReviewParams(Picture picture,User loginUser);
    Integer uploadPictureByBatch(PictureUploadByBatchRequest pictureUploadByBatchRequest, User loginUser);
    boolean editPicture(PictureEditRequest pictureEditRequest, HttpServletRequest user);
    boolean deletePicture(Long pictureId, User user);

    void editPictureBatch(PictureEditByBatchRequest pictureEditBatchRequest, User user);
    CreateOutPaintingTaskResponse createPictureOutPaintingTask(CreatePictureOutPaintingTaskRequest createPictureOutPaintingTaskRequest, User loginUser);
}
